import axios,{AxiosInstance,AxiosRequestConfig,AxiosResponse} from '@ohos/axios'

class index1 {
  private aaa:AxiosInstance
  constructor() {
    this.aaa=axios.create({
      baseURL:"http://192.168.0.125:3000/",
      timeout:1000
    })
  }

  data(config:AxiosRequestConfig):Promise<AxiosResponse>{
    return this.aaa.request(config)
  }
}

export let http=new index1()

class hompage {
  private listData: AxiosInstance

  constructor() {
    this.listData = axios.create({
      baseURL: "http://192.168.0.125:3000/",
      timeout: 1000,
    })
  }
  data(config: AxiosRequestConfig): Promise<AxiosResponse> {
    return this.listData.request(config)
  }
}

export let http1 = new hompage()
